home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Sprite 1984 - 1993
/
Sprite 1984 - 1993.iso
/
src
/
lib
/
c
/
etc
/
RCS
/
isatty.c,v
< prev
next >
Wrap
Text File
|
1992-03-27
|
1KB
|
86 lines
head 1.1;
branch ;
access ;
symbols sprited:1.1.1;
locks ; strict;
comment @ * @;
1.1
date 88.07.14.14.08.01; author ouster; state Exp;
branches 1.1.1.1;
next ;
1.1.1.1
date 91.12.08.14.48.53; author kupfer; state Exp;
branches ;
next ;
desc
@@
1.1
log
@Initial revision
@
text
@/*
* isatty.c --
*
* Procedure to map from Unix isatty system call to Sprite.
*
* Copyright 1986 Regents of the University of California
* All rights reserved.
*/
#ifndef lint
static char rcsid[] = "$Header: isatty.c,v 1.1 88/06/19 14:31:34 ouster Exp $ SPRITE (Berkeley)";
#endif not lint
#include <sgtty.h>
/*
*----------------------------------------------------------------------
*
* isatty --
*
* Returns non-zero if the given file descriptor refers to a device
* with terminal-like characteristics.
*
* Results:
* Non-zero means fd has terminal-like behavior, zero means it
* doesn't.
*
* Side effects:
* None.
*
*----------------------------------------------------------------------
*/
int
isatty(fd)
int fd; /* stream identifier */
{
struct sgttyb sgttyb;
if (ioctl(fd, TIOCGETP, (char *) &sgttyb) == -1) {
return 0;
}
return 1;
}
@
1.1.1.1
log
@Initial branch for Sprite server.
@
text
@d11 1
a11 1
static char rcsid[] = "$Header: /sprite/src/lib/c/etc/RCS/isatty.c,v 1.1 88/07/14 14:08:01 ouster Exp Locker: rab $ SPRITE (Berkeley)";
@